{// 引入标签库 }
<tagLib name="html" />
{// 加载头部公共文件 }
<include file="../Public/header" />
 <div class="main">
 <H2>数据批量导入</H2>
 本模块允许你上传DBF,来批量导入数据,请确认你的文件格式一定是DBF4的。
 <div id="main" class="main" >
<SCRIPT LANGUAGE="JavaScript">
<!--
function addRow(){   
	curFileNum++;
	rowsnum++;
    var row=tbl.insertRow(-1);
	//var td = arow.insertCell();
	var cell = document.createElement("td");
	cell.innerHTML='<div class="fLeft hMargin"><div class="impBtn  fLeft" ><INPUT TYPE="file" id="file'+curFileNum+'" name="file'+ curFileNum +'" class="file  huge"></div><div class="fLeft hMargin"></div>';
	cell.align="center"
	row.appendChild(cell); 
	//addFileForm.num.value=rowsnum;
}
function deleteRow(){
	if(tbl.rows.length>0){
		tbl.deleteRow(rindex); //删除当前行
		rowsnum--;    
	}else{
		return;
	}
	rindex="";
}
function getObject(obj){ 
	rindex=obj.parentElement.parentElement.rowIndex;/*当前行对象*/
}

function uploading(msg){
	document.getElementById('result').style.display = 'block';
	document.getElementById('result').innerHTML	=	'<IMG SRC="__PUBLIC__/Images/ajaxloading.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="" align="absmiddle"> 文件上传中～';
	return true;
}

function uploadComplete(){

}
//-->
</SCRIPT>
<div class="content">
<form id="upload" METHOD=POST action="__URL__/upload/" enctype="multipart/form-data" target="iframeUpload">
<TABLE cellpadding=3 cellspacing=3 width="450PX">
<TR>
	<TD colspan="2" class="tLeft">
	<div class="result" style="background:#E9E9F3">上传允许文件类型：DBF4文件。</div>
	<INPUT TYPE="submit" value="上 传" onClick="uploading();" class="small button "></TD>
</TR>
<TR>
	<TD class="tRight tTop"></TD>
	<TD class="tLeft tTop">
	<div id="result" class="result none"></div>
	<INPUT TYPE="hidden" name="ajax" value="1">
	<iframe name="iframeUpload" src="" width="350" height="35" frameborder=0  SCROLLING="no" style="display:NONE"></iframe>
	<input type="hidden" name="MAX_FILE_SIZE" value="106836000" />
	<INPUT TYPE="hidden" name="_uploadFileResult" value="result">
	<INPUT TYPE="hidden" name="_uploadFormId" value="upload">
	<INPUT TYPE="hidden" name="_uploadFileSize" value="106836000">
	<INPUT TYPE="hidden" NAME="_uploadFileType" value="dbf" >
	<INPUT TYPE="hidden" name="_uploadResponse" value="uploadComplete">
	<INPUT TYPE="hidden" name="_uploadSavePath" value="<?php echo APP_PATH.'/../'.'Public/Uploads/';?>" >
	<TABLE id='tbl' style="clear:both"></TABLE>
</TD>
</TR>

</TABLE>
</form>
</div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
var curFileNum = 0;
var rowsnum=0;  //记录行数
var rindex="";       //列索引
var tbl	=	document.getElementById('tbl');
addRow();
//-->
</SCRIPT>
</div>
<!-- 主页面结束 -->
{// 加载尾部公共文件 }
<include file="../Public/footer" /> 